package com.bite.writtenTraining;

import java.util.*;
import java.io.*;

public class Date11_21 {
    /**
     * 滑动窗口
     * https://ac.nowcoder.com/acm/problem/221681
     * @param args
     */
    public static void main(String[] args) throws IOException{
        Read in = new Read();
        int n = in.nextInt(), x = in.nextInt();
        int[] arr = new int[n + 1];
        for(int i = 1; i <= n; i++){
            arr[i] = in.nextInt();
        }
        int left = 1, right = 1;
        int rleft = -1, rright = -1, rlen = n;
        int sum = 0;
        while(right <= n){
            sum += arr[right];
            while(sum >= x){
                int len = right - left + 1;
                if(len < rlen){
                    rleft = left;
                    rright = right;
                    rlen = len;
                }
                sum -= arr[left];
                left++;
            }
            right++;
        }
        System.out.print(rleft + " " + rright);
    }
}
class Read // ⾃定义快读 Read
{
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException
    {
        while(!st.hasMoreTokens())
        {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }

    String nextLine() throws IOException
    {
        return bf.readLine();
    }

    int nextInt() throws IOException
    {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException
    {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException
    {
        return Double.parseDouble(next());
    }
}